gh auth
命令手册Authenticate with a GitHub host from the command line. More information: https://cli.github.com/manual/gh_auth.
gh auth login
echo {{your_token}} | gh auth login --with-token
gh auth status
gh auth logout
gh auth login --hostname {{github.example.com}}